<style>
  /* 两条线的效果 */
  a {
    background:
      linear-gradient(90deg, #0cc, #0cc),
      linear-gradient(90deg, #ff3c41, #fc0, #8500d8);
    background-size: 100% 3px, 0 3px;
    background-repeat: no-repeat;
    background-position: 100% 100%, 0 100%;
    transition: 0.5s all;
    color: #0cc;
  }

  a:hover {
    background-size: 0 3px, 100% 3px;
    color: #000;
  }
</style>


<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. <a>Mollitia nostrum placeat consequatur deserunt velit
    ducimus possimus commodi temporibus debitis quam</a>, molestiae laboriosam sit repellendus sed sapiente quidem quod
  accusantium vero.</p>